//
//  SEAddressAPI.swift
//  SmartEyeForPatient
//
//  Created by qdsg on 2021/4/20.
//

import Moya

enum SEAddressAPI {
    case address(id: String)
}

extension SEAddressAPI: TargetType {
    var baseURL: URL { URL(string: SEApiManager.baseUrl)! }

    var path: String { "/ng/newfuture-org/region/listById" }

    var method: Moya.Method { .get }

    var sampleData: Data { "".data(using: .utf8)! }

    var task: Task { .requestParameters(parameters: parameters, encoding: URLEncoding.default) }

    var headers: [String : String]? {
        return SEApiManager.headers
    }
    
    private var parameters: [String: Any] {
        switch self {
        case .address(let id): return ["id": id]
        }
    }
}
